/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package asset;

import com.jme3.animation.AnimControl;
import com.jme3.animation.Animation;
import com.jme3.scene.Node;
import java.util.List;

/**
 *
 * @author
 */
public class ActionSet {

    List<Animation> animations;

    public ActionSet(List<Animation> animations) {
        this.animations = animations;
    }

    public void imbue(Node modelNode) {        
        AnimControl animControl = modelNode.getControl(AnimControl.class);
        if (animControl != null) {
            for (Animation a : animations) {
                Animation b = a.cloneForSpatial(modelNode);
                animControl.addAnim(b);
            }
        }
    }
}
